App.require(function () {
    var app = App.getCurrent();

    app.definePage("strtoastactive", {
        render: function (next) {
            this.data = this.parent.data;
            if (location.protocol !== "file:") {
                this.fetch("./index.html", function (text) {
                    next(this.renderHTML(text));
                })
            }
            else next(this.renderHTML(App.staticHtml.toastIndexHtml));
        },
        getDomObj: function () {
            this.attachDom(".str-toast-cancel", "toastCancel")

            if (this.domList.toastCancel) {
                this.attachEvent("toastCancel", "btnclick", this.toastCancelHandler, false);
            }
        },
        toastCancelHandler: function (ev) {
            this.parent.dispatchEvent({
                type: "cancel"
            });
        },
        init: function () {
            this.parent.startToHidden();
        }
    })
});